<%@ include file="../common/base.jsp" %>
<%@ page contentType= "text/html;charset=utf-8" %>
<%@ page language="java" import="com.octopus.optiworks.service.ConfigurationService"%>
<% boolean isAutoOperatorDate = ConfigurationService.getInstance().isAutoOpeartorDate() ; %>

<c:forEach var="step110Data" varStatus="status" items="${product.step110Datas}">
<c:if test="${not empty step110}">
<input type="hidden" name="id" value="<c:out value="${step110Data.id}" />">
<input type="hidden" name="product" value="<c:out value="${step110Data.product.id}" />">
<input type="hidden" name="className" value="com.octopus.optiworks.model.Step110Data">
<input type="hidden" name="step" value="step110">

<table width="100%" rules="all">
	<tr>
		<td align="left" width="100%" colspan="3">
			<strong style="color:#A0A0FF">Step 110 焊接后检测 (MPI: ZY-60-041)</strong>
		</td>
	</tr>
	<c:forEach var="remarkLog" items="${step110Data.remarkLogs}">
	<tr bgcolor="#F0F0FF">
		<td align="left" width="40%">
			Operator/Date:
			<c:out value="${remarkLog.operator}" />
			/
			<fmt:formatDate  value="${remarkLog.date}" pattern="yyyy-MM-dd HH:mm"/>
		</td>
		<td align="left" width="30%">
			测试结果:<c:out value="${remarkLog.testResult}" />
		</td>
		<td align="left" width="30%">
			备注:
			<c:out value="${remarkLog.remark}" />
		</td>
	</tr>
	</c:forEach>
	<tr bgcolor="#F0F0FF">
		<td align="left" width="40%">
			Operator/Date:
			<% if(isAutoOperatorDate){ %>
			<c:out value="${step110Data.operator}" />
			/
			<fmt:formatDate  value="${step110Data.date}" pattern="yyyy-MM-dd HH:mm"/>
			<% }else{ %>
			<select name="operator">
				<c:forEach var="user" items="${users}">
				<option value="<c:out value="${user.username}" />" 
				<c:if test="${(null==step110Data.operator && user.username==currentUser.username) || (null!=step110Data.operator && user.username==step110Data.operator)}">
				selected="selected"
				</c:if>
				><c:out value="${user.username}" /></option>
				</c:forEach>
				</select>
				/
				<input type="text" name="date" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" class="Wdate" style="width:130px" value="<fmt:formatDate  value="${step110Data.date}" pattern="yyyy-MM-dd HH:mm"/>">
			<% } %>
		</td>
		<td align="left" width="30%">
			测试结果:
			<c:if test="${step110Data.testResult=='Pass' || empty step110Data.testResult}">
				<input type="radio" name="testResult" value="Pass" checked>Pass(合格)
			</c:if>
			<c:if test="${step110Data.testResult!='Pass' && not empty step110Data.testResult}">
				<input type="radio" name="testResult" value="Pass" >Pass(合格)
			</c:if>
			<c:if test="${step110Data.testResult=='Fail'}">
				<input type="radio" name="testResult" value="Fail" checked>Fail(失败)
			</c:if>
			<c:if test="${step110Data.testResult!='Fail'}">
				<input type="radio" name="testResult" value="Fail" >Fail(失败)
			</c:if>
		</td>
		<td align="left" width="30%">
			备注:
			<input type="text" name="remark" value="<c:out value="${step110Data.remark}" />">
		</td>
	</tr>
</table>
</c:if>

<c:if test="${empty step110}">
<table width="100%" rules="all">
	<tr>
		<td align="left" width="100%" colspan="3">
			<strong>Step 110 焊接后检测 (MPI: ZY-60-041)</strong>
			<shiro:hasPermission name="process:edit">
			<c:if test="${empty step110 && empty View}">
			&nbsp;&nbsp;
			<a href="./sedit.o?productId=<c:out value='${product.id}'/>&step=step110">
				<fmt:message key="Edit" />
			</a>
			</c:if>
			</shiro:hasPermission>
		</td>
	</tr>
	<c:forEach var="remarkLog" items="${step110Data.remarkLogs}">
	<tr>
		<td align="left" width="40%">
			Operator/Date:
			<c:out value="${remarkLog.operator}" />
			/
			<fmt:formatDate  value="${remarkLog.date}" pattern="yyyy-MM-dd HH:mm"/>
		</td>
		<td align="left" width="30%">
			测试结果:<c:out value="${remarkLog.testResult}" />
		</td>
		<td align="left" width="30%">
			备注:
			<c:out value="${remarkLog.remark}" />
		</td>
	</tr>
	</c:forEach>
	<c:if test="${not empty step110Data.testResult}">
	<tr>
		<td align="left" width="40%">
			Operator/Date:
			<c:out value="${step110Data.operator}" />
			/
			<fmt:formatDate  value="${step110Data.date}" pattern="yyyy-MM-dd HH:mm"/>
		</td>
		<td align="left" width="30%">
			测试结果:<c:out value="${step110Data.testResult}" />
		</td>
		<td align="left" width="30%">
			备注:
			<c:out value="${step110Data.remark}" />
		</td>
	</tr>
	</c:if>
</table>
</c:if>
</c:forEach>


